//part1:C05:ex5.14.cpp
// count of repeated words.
#include <iostream>

int main(void){
  using namespace std;
  string currStr, preStr = "", maxStr;
  int currCnt = 1, maxCnt = 0;
  while (cin >> currStr){
    if (currStr == preStr){
      ++currCnt;
      if (currCnt > maxCnt){
        macCnt = currCnt;
        maxStr = currStr;
      }
    }
    else {
      currCnt = 1;
    }
    preStr = currStr;
  }
  if (maxCnt > 1){
    cout << "the most repeated is : " << maxStr
         << "count is : " << maxCnt << endl;
  }
  else{
    cout << "other words is : " << endl;
  }

  return 0;
}
